package org.minos.edit.view
{
	import flash.events.Event;
	import org.ichow.edit.EditFacate;
	import org.ichow.edit.view.components.aitem.AssetsItem;
	import org.ichow.edit.view.components.Assets;
	import org.puremvc.as3.interfaces.INotification;
	import org.puremvc.as3.patterns.mediator.Mediator;
	
	/**
	 * ...
	 * @author M.ichow
	 */
	public class AssetsMediator extends Mediator
	{
		public static const NAME : String = "AssetsMediator";
		public static const SOUND : String = NAME + "_Sound";
		public static const MOVIE : String = NAME + "_Movie";
		public static const SWF : String = NAME + "_Swf";
		
		
		public function AssetsMediator( v : Assets )
		{
			super( NAME , v );
		}
		
		public function get assets() : Assets
		{
			return viewComponent as Assets;
		}
		
		override public function listNotificationInterests() : Array
		{
			return [ EditFacate.ASSETS_CHANGE ];
		}
		
		override public function handleNotification( notification : INotification ) : void
		{
			super.handleNotification( notification );
			switch ( notification.getName() )
			{
				case EditFacate.ASSETS_CHANGE: 
					assets.items = notification.getBody() as Array;
					break;
				default: 
			}
		}
	
	}

}